package com.yanqu.road.server.manger.activity.curio.condition;

import com.yanqu.road.entity.curio.enums.eCurioConditionType;
import com.yanqu.road.server.gameplayer.GamePlayer;

import java.util.List;

public abstract class BaseCurioSpecialCondition {

    GamePlayer player;

    public BaseCurioSpecialCondition(GamePlayer player) {
        this.player = player;
    }

    /**
     * 是否满足条件
     */
    public abstract boolean isCompleted(List<Integer> params);

    /**
     * 条件值
     */
    public abstract long getConditionValue(List<Integer> params);

    public static BaseCurioSpecialCondition getCondition(int type, GamePlayer player){

        if(type == eCurioConditionType.GetBeautyNumByOccupation.getType()){
            return new GetBeautyNumByOccupationCondition(player);
        }else if(type == eCurioConditionType.JoinNewMonopolyTimes.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.JoinZSTimes.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.JoinTradeWarTimes.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.JoinBanquetTimes.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.InnCookTime.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.GetMonthCardRewardTime.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.GetYearCardRewardTime.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.GiveLikeRankTimes.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.GiveLikeMammonTimes.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.GetTitleRewardTimes.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.ChildAdultNumByOccupation.getType()){
            return new CurioCountCondition(type, player);
        }else if(type == eCurioConditionType.GetBeautyByQuality.getType()){
            return new GetPeerlessBeautyNumCondition(player);
        }

        return null;
    }

}
